package com.ourfox.platform.main;

/**
 * 
 * <p>Title: SystemInfo.java</p>
 * <p>Description: 系统相关信息</p>
 * <p>Company: ourfox</p>
 *
 * @author luoxiujin<xiujin.luo@gmail.com>  
 * @version V1.0
 * @date 2011-10-10 下午10:12:45
 *
 */
public class SystemInfo {

	/**
	 * webapp相对目录 如：/iserverapp
	 * 
	 */
	private String contextPath;
	
	/**
	 * webapp跟目录 如：C:/workspace/workspace/iserverapp/WebRoot/
	 */
	private String webRootPath;

	/**
	 * @Title: getAppRootPath
	 * @Description: 返回应用的跟目录
	 *
	 * @return
	 */
	public String getAppRootPath() {
		String path = this.contextPath + "/";
		return this.webRootPath.substring(0, this.webRootPath.indexOf(path) + path.length());
	}
	
	public String getContextPath() {
		return contextPath;
	}

	public void setContextPath(String contextPath) {
		this.contextPath = contextPath;
	}

	public String getWebRootPath() {
		return webRootPath;
	}

	public void setWebRootPath(String webRootPath) {
		this.webRootPath = webRootPath;
	}

	
	
	
	
	
}
